package com.ruoyi.syf.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.syf.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("开停工记录表")
public class RiskShutdownRecord extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "ID")
    private Long id;

    @ApiModelProperty(value = "对象ID")
    private Long objectId;

    @ApiModelProperty(value = "单元ID")
    private Long unitId;

    @ApiModelProperty(value = "停工开始时间")
    private Date beginTime;

    @ApiModelProperty(value = "停工结束时间")
    private Date endTime;

    @ApiModelProperty(value = "原因")
    private String reason;

    public RiskShutdownRecord(Long objectId, Long unitId, Date beginTime, String reason) {
        this.objectId = objectId;
        this.unitId = unitId;
        this.beginTime = beginTime;
        this.reason = reason;
    }

    public RiskShutdownRecord(Long id, Long objectId, Long unitId, Date beginTime, Date endTime, String reason) {
        this.id = id;
        this.objectId = objectId;
        this.unitId = unitId;
        this.beginTime = beginTime;
        this.endTime = endTime;
        this.reason = reason;
    }

    public RiskShutdownRecord() {
    }
}
